﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CurriculasEntities;
using CurriculasDAO;

namespace CurriculasController
{
    public class PlanCurricularBL : IDisposable
    {
        private PlanCurricularDAO _plancurricularDAO;

        public PlanCurricularBL()
        {
            _plancurricularDAO = new PlanCurricularDAO();
        }

        public int Crear(PlanCurricularBE entidad)
        {
            return _plancurricularDAO.Crear(entidad).codPlanCurricular;
        }

        public PlanCurricularBE Modificar(PlanCurricularBE entidad)
        {
            return _plancurricularDAO.Modificar(entidad);
        }

        public ICollection<PlanCurricularBE> ListarTodos()
        {
            return _plancurricularDAO.ListarTodos();
        }

        public PlanCurricularBE Obtener(int codPlanCurricular)
        {
            return _plancurricularDAO.Obtener(codPlanCurricular);
        }

        public void Dispose()
        {
            _plancurricularDAO = null;
            GC.SuppressFinalize(this);
        }
    }
}
